
import Components from 'unplugin-vue-components/vite'
import AutoImport from 'unplugin-auto-import/vite'
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'

// https://nuxt.com/docs/api/configuration/nuxt-config
// @ts-ignore
export default defineNuxtConfig({
  ssr: false,
  runtimeConfig: {
    public: {
      apiBase: '',
    }
  },
  typescript: {
    shim: false
  },
  modules: [
    '@element-plus/nuxt',
    '@pinia/nuxt',
    '@pinia-plugin-persistedstate/nuxt'
  ],

  css: [
    'normalize.css',
    'element-plus/dist/index.css',
    'element-plus/theme-chalk/display.css',
    '@/assets/css/main.css'
  ],
  vite: {
    css: {
      preprocessorOptions: {
        scss: {
          additionalData: '@use "@/assets/index.scss" as *;'
        }
      }
    },
    plugins: [
      AutoImport({
        resolvers: [ElementPlusResolver()],
      }),
      Components({
        resolvers: [ElementPlusResolver()],
      })
    ]
  },
  // https://nuxt.com.cn/modules/element-plus#themes
  elementPlus: {
    icon: 'ElIcon',
    importStyle: 'scss',
    themes: ['dark'],
  },
  app: {
    head: {
      title:
        "蜜蜂会员api接单",
      htmlAttrs: {
        lang: "en",
      },
      viewport: 'width=device-width,initial-scale=1',
      meta: [
        {
          "http-equiv":"Expires",
          "content":"0"
        },
        {
          "http-equiv":"Pragma",
          "content":"no-cache"
        },
        {
          "http-equiv":"Cache",
          "content":"no-cache"
        },
        {
          "http-equiv":"Cache-Control",
          "content":"no-cache, no-store, must-revalidate"
        },
        {
          
          "charset": "utf-8"
        },
        {
          hid: "description",
          name: "description",
          content:
            "",
        },
        {
          hid: "keywords",
          name: "keywords",
          content:
            "",
        }
      ],

      script: [
        {
          src: "https://gg-common.oss-cn-beijing.aliyuncs.com/js/moyutime.js?v=1",
        },
      ]
    }
  },
  devServer: {
    port: 3009
  }
})
